package com.eckey.lab.service.impl;

import com.alibaba.fastjson.JSON;
import com.eckey.lab.dao.ProductDao;
import com.eckey.lab.entity.Product;
import com.eckey.lab.service.ProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Service
public class ProductServiceImpl implements ProductService {

    @Resource
    private ProductDao productDao;

    @Override
    public List<Product> lists() {
        List<Product> lists = productDao.lists();
        log.info("查询商品信息结果为：{}", JSON.toJSONString(lists));
        return lists;
    }
}
